<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>rsdemo - Command-line demonstration and development tool for RiveScript.</title>
<link rel="stylesheet" href="rivescript.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>

<body>


<!-- INDEX BEGIN -->
<div name="index">
<p><a name="__index__"></a></p>

<ul>

	<li><a href="#name">NAME</a></li>
	<li><a href="#synopsis">SYNOPSIS</a></li>
	<li><a href="#description">DESCRIPTION</a></li>
	<li><a href="#options">OPTIONS</a></li>
	<li><a href="#debugging">DEBUGGING</a></li>
</ul>

<hr name="index" />
</div>
<!-- INDEX END -->

<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>rsdemo - Command-line demonstration and development tool for RiveScript.</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
  Usage: rsdemo
         rsdemo --debug
         rsdemo /path/to/replies
         rsdemo --debug /path/to/replies</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p><strong>rsdemo</strong> is a program for testing and developing RiveScript code via the
command line. Run with no arguments, rsdemo loads the default set of RiveScript
replies that are installed in your Perl lib. The default set is based on the
classic Eliza bot's personality, with additional triggers for learning and
repeating user information.</p>
<p>If you have a different directory containing RiveScript documents, pass the
path to that directory on the command line, and <code>rsdemo</code> will load replies
from there instead.</p>
<p>
</p>
<hr />
<h1><a name="options">OPTIONS</a></h1>
<dl>
<dt><strong><a name="debug" class="item">--debug</a></strong></dt>

<dd>
<p>This will enable RiveScript debug mode. A <strong>lot</strong> of information is printed to
the terminal when debug mode is active.</p>
</dd>
<dt><strong><a name="debugfile_file_f" class="item">--debugfile=?, --file=?, -f=?</a></strong></dt>

<dd>
<p>Specify an external file for debug lines to be printed to. Since a lot of debug
information gets printed, you might want to use this in conjunction with
<code>--verbose=0</code>.</p>
</dd>
<dt><strong><a name="verbose_v" class="item">--verbose=?, -v=?</a></strong></dt>

<dd>
<p>Enable or disable verbose (debug) mode. This option only has an effect if debug
mode is on. If verbose is <code>1</code> (the default), all debug information is printed
to the terminal. Set verbose to <code>0</code> and this information will NOT go to the
terminal.</p>
<p>If <code>debugfile</code> is provided, all debug information will (also) be printed to the
debug file.</p>
</dd>
<dt><strong><a name="nostrict" class="item">--nostrict</a></strong></dt>

<dd>
<p>Turn off strict mode when parsing the RiveScript documents. When strict mode
is enabled (default), a syntax error in the RiveScript code is a fatal error.
When turned off, it results in a warning, and the rest of the file that caused
the error is skipped.</p>
</dd>
<dt><strong><a name="help" class="item">--help</a></strong></dt>

<dd>
<p>Prints the usage of the command.</p>
</dd>
</dl>
<p>
</p>
<hr />
<h1><a name="debugging">DEBUGGING</a></h1>
<p>The <code>rsdemo</code> tool can be used for debugging a custom set of RiveScript replies.
If you pass the <a href="#debug"><code>--debug</code></a> option, debug mode is activated. By default, all
debug information will be printed to the terminal, which is likely going to be
more lines than your scrollback buffer can display. Unless you have a very small
amount of replies you're debugging, it'll be more practical to pipe the debug
information into a file and not display it on the terminal.</p>
<p>Here's an example:</p>
<pre>
  rsdemo --debug --verbose=0 --file=debug.txt /path/to/replies</pre>
<p>Or a shortened example:</p>
<pre>
  rsdemo --debug -v=0 -f=debug.txt /path/to/replies</pre>
<p>In this case, the terminal would act as normal and allow you to chat with the
bot, and all debug information would be written to debug.txt.</p>

</body>

</html>
